Skip to content

Conversation

@CarlSchwan
Copy link
Member

@CarlSchwan CarlSchwan commented Jan 13, 2026

  • Resolves: #

Summary

image

TODO

  • ...

Checklist

@CarlSchwan CarlSchwan added this to the Nextcloud 33 milestone Jan 13, 2026
@CarlSchwan CarlSchwan self-assigned this Jan 13, 2026
@CarlSchwan CarlSchwan changed the title perf(files): Optimize CacheEntry creatoin perf(files): Optimize CacheEntry creation Jan 13, 2026
@CarlSchwan CarlSchwan force-pushed the carl/optimize-cacheentry branch 2 times, most recently from 8cdfdc5 to 043708f Compare January 13, 2026 14:29
@CarlSchwan CarlSchwan marked this pull request as ready for review January 13, 2026 14:31
@CarlSchwan CarlSchwan requested a review from a team as a code owner January 13, 2026 14:31
@CarlSchwan CarlSchwan requested review from icewind1991, leftybournes, sorbaugh and yemkareems and removed request for a team January 13, 2026 14:31
@icewind1991
Copy link
Member

Weird that this makes such a difference...

@CarlSchwan CarlSchwan force-pushed the carl/optimize-cacheentry branch from 043708f to dea1b7a Compare January 13, 2026 15:12
@CarlSchwan
Copy link
Member Author

Weird that this makes such a difference...

Not really, array in php are copy on write. So each assignment create a copy.

@nextcloud-bot nextcloud-bot mentioned this pull request Jan 12, 2026
@CarlSchwan CarlSchwan force-pushed the carl/optimize-cacheentry branch from dea1b7a to b7d2a16 Compare January 13, 2026 16:27
Copy link
Member

@icewind1991 icewind1991 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure if not allowing arbitrary fields doesn't break things

@Altahrim
Copy link
Collaborator

Maybe we can detect those cases and add a warning for them?

@CarlSchwan
Copy link
Member Author

I'm not sure if not allowing arbitrary fields doesn't break things

So I checked https://github.com/search?q=org%3Anextcloud%20cacheEntryFromData&type=code and the only apps that use cacheEntryFromData are: deck, circles, talk and groupfolders.

For deck, circles and talk it's about sharing and these are the same additional fields as sharing on server

For groupfolders, I added the specific fields from groupfolders. It reduces a bit the optimization when listing the groupfolders but there should be significantly less groupfolders than normal files/folders, so this should be fine

@icewind1991
Copy link
Member

Thanks for checking, I think there might be some other places that set their own fields in CacheWrapper::formatCacheEntry but those are done after the constructor so shouldn't be impacted by this.

@nextcloud-bot nextcloud-bot mentioned this pull request Jan 14, 2026
@Altahrim Altahrim added the 4. to release Ready to be released and/or waiting for tests to finish label Jan 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

4. to release Ready to be released and/or waiting for tests to finish

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants